package cn.qzzg.springcloud.user.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 读取nacos配置
 */
@RestController
@RefreshScope
public class ConfigController {

    @Value("${user.username}")
    private String username;

    @Value("${user.password}")
    private String password;

    @GetMapping("/getUserInfoConfig")
    public String getUserInfoConfig(){
       return "username:"+username+",password:"+password;
    }
}
